<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型示例</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }

        .card {
            width: 300px;
            height: 200px;
            background-color: #e8e8e8;
            position: relative;
            margin: 30px auto;
            padding: 10px;
        }

        .card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
        }

        .card p {
            width: 260px;
            height: 30px;
            background-color: white;
            border: 5px solid red;
            margin: 40px auto 0;
            padding: 10px;
            text-align: center;
            line-height: 30px;
            color: black;
            font-size: 16px;
        }
    </style>
</head>
<body>
<div class="card">
    <img src="img/1.png" alt="">
    <p>我是文字</p>
</div>
<div class="card">
    <img src="img/1.png" alt="">
    <p>我是文字</p>
</div>
</body>
</html>
